
#ifndef CODE_IMAGE_H_
#define CODE_IMAGE_H_

extern float MY_midin_line;
extern uint16_t lignt;

#define GRAYSCALE 256
#define jidian_search_line 120
#define search_start_line 120
#define search_end_line 0
#define left_line_right_scarch 10
#define left_line_left_scarch 5
#define right_line_left_scarch 10
#define right_line_right_scarch 5

extern uint16_t base_image[MT9V03X_H][MT9V03X_W];
extern uint8_t image[MT9V03X_H][MT9V03X_W];
extern uint8_t img_threshold;
extern uint8_t left_jidian;
extern uint8_t right_jidian;
extern uint8_t left_line_list[MT9V03X_H];
extern uint8_t right_line_list[MT9V03X_H];
extern uint8_t mid_line_list[MT9V03X_H];
extern uint8_t final_mid_line;
extern uint8_t kewu;

uint8_t Ostu(uint8_t index[MT9V03X_H][MT9V03X_W]);
void set_image_twovalues(uint8_t value);
void find_jidian(uint8_t index[MT9V03X_H][MT9V03X_W]);
void image_deal(uint8_t index[MT9V03X_H][MT9V03X_W]);
uint8_t find_mid_line_weight(void);
uint8_t detect_road_type(void);
extern uint8_t current_road_type;
extern void draw_line(void);

#endif
